<template>
  <div class="container">
    <div class="search-container">
      <el-card shadow="never">
        <!-- 搜索功能 -->
        <el-row class="demo-autocomplete">
          <el-col class="search">
            <span class="sub-title">学科名称</span>
            <el-input v-model="queryText" class="inputSearch"></el-input>
          </el-col>
          <!-- 按钮 -->
          <el-button size="small" class="clear">清除</el-button>
          <el-button size="small" type="primary">搜索</el-button>
          <el-button
            size="small"
            class="increase"
            type="success"
            icon="el-icon-edit"
            >新增学科</el-button
          >
          <!-- 按钮 -->
        </el-row>
        <!-- 搜索功能 -->
        <!-- 提示文案 -->
        <el-alert title="数据一共 0 条" type="info" show-icon closable="false">
        </el-alert>
        <!-- 提示文案 -->

        <!-- 表格 -->
        <el-table :data="subjectsList" style="width: 100%">
          <el-table-column label="序号" type="index" width="50">
          </el-table-column>
          <el-table-column prop="subjectName" label="学科名称" width="180">
          </el-table-column>
           <el-table-column prop="creator" label="创建者" width="180">
          </el-table-column>
             <el-table-column prop="addDate" label="创建日期" width="180">
          </el-table-column>
           <el-table-column prop="isFrontDisplay" label="前台是否显示" width="180">
          </el-table-column>
            <el-table-column prop="twoLevelDirectory" label="二级目录" width="180">
          </el-table-column>
           <el-table-column prop="tags" label="标签" width="180">
          </el-table-column>
             <el-table-column prop="totals" label="题目数量" width="180">
          </el-table-column>
             <el-table-column label="操作" width="180">
          </el-table-column>
        </el-table>
        <!-- 表格 -->
      </el-card>
    </div>
  </div>
</template>

<script>
import { list } from '@/api/hmmm/subjects'
export default {
  name: 'subjects',
  data () {
    return {
      queryText: '',
      subjectsList: '',
      page: 1,
      pagesize: 10
    }
  },
  methods: {
    async getSubjects () {
      try {
        const { data } = await list({
          query: {
            page: this.page,
            pagesize: this.pagesize
          }
        })
        console.log(data)
      } catch (err) {}
    }
  }
}
</script>

<style scoped>
.demo-autocomplete .sub-title {
  margin-left: 15px;
}

.demo-autocomplete .inline-input {
  margin-left: 20px;
}
.demo-autocomplete .el-col-12 {
  width: 26%;
}

.demo-autocomplete .clear {
  right: 0;
}

.demo-autocomplete .increase {
  float: right;
}
.search {
  width: 270px;
}
.inputSearch {
  width: 173px;
  height: 28px;
  margin: 0 7px;
}
.el-alert {
  margin: 20px 0;
}

.container {
  padding: 20px;
}
</style>
